<template>
  <div class="home-new">
    <div class="home-new-title">
      <h3>每周上新</h3>
    </div>
    <ul>
      <li v-for="item in newList" :key="item.id">
        <img :src="item.list_pic_url" alt="" />
        <p>{{ item.name }}</p>
        <p><span>￥</span>{{ item.retail_price }}</p>
      </li>
    </ul>
  </div>
</template>

<script setup>
const newList = [
{ name: '桂花猫咪太阳伞', list_pic_url: '/images/new1.jpg', retail_price: '39' },
{ name: '花知晓仲夏夜香水', list_pic_url: '/images/new2.jpg', retail_price: '189' },
{ name: '随身化妆镜 ', list_pic_url: '/images/new3.jpg', retail_price: '60' },
{ name: '母贝表 ', list_pic_url: '/images/new4.jpg', retail_price: '128' },
{ name: '玉兔摆件 ', list_pic_url: '/images/new5.jpg', retail_price: '48' },
{ name: '白玉髓手镯', list_pic_url: '/images/new6.jpg', retail_price: '430' },
{ name: '金沙琉璃珠', list_pic_url: '/images/new7.jpg', retail_price: '96' },
{ name: '梳妆镜', list_pic_url: '/images/new8.jpg', retail_price: '139' }
]
</script>

<style lang="less" scoped>
.home-new {
  .home-new-title {
    text-align: center;
    font-size: 16px;
    margin-top: 1.6rem;
    height: 50px;
    h3 {
      width: 50%;
      border-top: 2px solid #ccc;
      padding-top: 8px;
      margin: 0 auto;
    }
  }
  ul {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 0 0 0;
    background-color: #f9f9f9; 
    li {
      width: 49.5%; 
      img {
        width: 100%;
      }
      p {
        text-align: center;
        margin: 0.5rem 0;
      }
      span {
        color: #FF8000; 
        font-size: 12px;
      }
    } 
  }
}
</style>